from Bite import Bite as bite_type

class Jaws:
	def attack(self,user):
		#bite=bite_type(x=user.rightSide(),y=user.y+user.getHeight()-40) if user.facingRight else bite_type(x=user.leftSide(),y=user.y+user.getHeight()-40)
		bite=bite_type(x=user.x,y=user.y+user.getHeight()-40)
		bite.x=user.rightSide() if user.facingRight else user.leftSide()
		bite.prev_x=0.5*(bite.prev_x+bite.x)
		bite.cur_room=user.cur_room
		bite.fraction=user.getIntendedFraction()
		user.cur_room.projectilesList.append(bite)